From: Ian Campbell Date: Thu, 21 Oct 2010 16:56:51 +0000 (+0100) Subject: xenstored: return EINVAL for attempt to watch invalid path X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11374 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=2eb54a2b4a65483cf8fc889c3fff77f7a5db4764;p=xen.git xenstored: return EINVAL for attempt to watch invalid path errno is essentially random at this point. Signed-off-by: Ian Campbell Signed-off-by: Ian Jackson --- diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c index 16d30899d4..65d4025239 100644 --- a/tools/xenstore/xenstored_watch.c +++ b/tools/xenstore/xenstored_watch.c @@ -134,7 +134,7 @@ void do_watch(struct connection *conn, struct buffered_data *in) relative = !strstarts(vec[0], "/"); vec[0] = canonicalize(conn, vec[0]); if (!is_valid_nodename(vec[0])) { - send_error(conn, errno); + send_error(conn, EINVAL); return; } }